package ZuoYe19;

import javax.swing.*;
import java.util.ArrayList;
import java.util.LinkedList;
import java.util.List;

public class DI4 {
    public static void main(String[] args) {
        long kaishi = System.currentTimeMillis();
        List a = new ArrayList();
        for (int i = 0; i < 10000; i++) {
            a.add(i);
        }
        for (int i = 0; i < 100; i++) {
            a.remove((int) (Math.random() * 100));
        }
        long jieshu = System.currentTimeMillis();
        System.out.println(jieshu - kaishi);
        System.out.println(">>>>>>>>>>>>>");
        long star = System.currentTimeMillis();
        List b = new LinkedList();
        for (int i = 0; i < 10000; i++) {
            b.add(i);
        }
        for (int i = 0; i < 100; i++) {
            b.remove((int) (Math.random() * 100));
        }
        long end = System.currentTimeMillis();
        System.out.println(end - star);

    }

}
